From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0001.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0002.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0003.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0001.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0005.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0003.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0006.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0004.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0001.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0007.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0005.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0002.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0008.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0006.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0003.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment.html From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0009.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0007.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0004.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0001.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0010.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0008.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0005.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0002.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0001.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0001.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0011.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0009.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0007.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0004.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0003.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0003.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0001.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0012.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0010.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0008.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0005.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0004.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0004.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0002.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0013.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0011.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0009.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0006.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0005.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0005.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0004.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0001.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0001.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0014.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0012.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0010.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0007.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0006.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0006.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0005.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0002.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0002.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0015.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0013.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0011.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0008.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0007.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0007.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0006.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0003.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0003.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0016.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0014.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0012.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0009.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0008.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0008.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0007.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0004.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0004.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0017.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0015.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0013.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0010.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0009.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0009.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0008.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0005.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0005.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0018.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0016.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0014.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0011.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0010.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0010.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0009.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0007.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0007.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0019.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0017.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0015.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0012.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0011.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0011.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0010.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0008.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0008.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0020.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0018.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0016.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0013.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0012.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0012.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0011.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0009.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0009.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0021.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0019.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0017.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0014.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0013.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0013.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0012.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0010.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0010.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0022.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0020.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0018.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0015.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0014.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0014.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0013.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0011.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0011.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0023.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0021.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0019.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0016.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0015.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0015.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0014.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0012.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0012.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0024.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0022.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0020.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0017.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0016.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0016.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0015.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0013.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0013.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0025.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0023.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0021.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0018.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0017.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0017.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0016.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0014.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0014.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0026.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0024.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0022.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0019.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0018.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0018.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0017.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0015.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0015.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0027.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0025.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0023.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0020.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0019.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0019.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0018.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0016.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0016.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0028.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0026.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0024.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0021.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0020.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0020.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0019.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0017.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0017.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0029.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0027.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0025.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0022.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0021.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0021.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0020.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0018.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0018.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0001.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0030.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0028.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0026.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0023.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0022.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0022.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0021.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0019.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0019.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0002.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0031.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0029.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0027.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0024.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0023.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0023.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0022.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0020.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0020.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0003.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0001.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0032.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0030.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0028.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0025.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0024.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0024.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0023.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0021.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0021.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0005.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0002.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0033.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0031.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0029.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0026.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0025.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0025.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0024.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0022.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0022.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0006.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0003.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0034.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0032.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0030.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0027.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0026.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0026.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0025.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0023.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0023.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0007.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0004.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0035.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0033.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0031.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0028.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0027.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0027.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0026.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0024.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0024.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0008.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0005.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0036.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0034.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0032.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0029.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0028.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0028.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0027.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0025.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0025.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0009.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0006.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0037.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0035.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0033.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0030.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0029.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0029.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0028.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0026.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0026.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0010.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0007.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0038.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0036.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0034.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0031.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0030.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0030.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0029.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0027.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0027.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0011.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0008.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0039.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0037.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0035.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0032.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0031.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0031.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0030.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0028.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0028.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0012.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0009.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0040.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0038.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0036.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0033.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0032.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0032.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0031.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0029.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0029.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0013.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0010.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0041.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0039.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0037.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0034.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0033.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0033.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0032.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0030.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0030.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0014.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0011.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0042.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0040.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0038.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0035.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0034.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0034.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0033.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0031.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0031.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0015.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0012.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0043.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0041.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0039.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0036.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0035.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0035.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0034.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0032.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0032.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0016.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0013.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0044.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0042.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0040.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0037.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0036.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0036.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0035.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0033.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0033.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0017.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0014.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0045.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0043.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0041.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0038.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0037.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0037.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0036.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0034.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0034.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0018.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0015.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0046.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0044.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0042.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0039.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0038.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0038.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0037.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0035.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0035.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0019.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0016.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0047.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0045.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0043.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0040.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0039.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0039.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0038.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0036.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0036.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0020.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0017.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0048.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0046.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0044.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0041.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0040.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0040.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0039.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0037.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0037.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0021.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0018.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0049.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0047.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0045.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0042.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0041.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0041.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0040.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0038.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0038.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0022.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0019.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0050.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0048.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0046.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0043.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0042.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0042.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0041.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0039.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0039.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0023.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0020.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0051.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0049.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0047.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0044.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0043.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0043.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0042.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0040.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0040.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0024.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0021.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0052.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0050.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0048.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0045.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0044.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0044.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0043.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0041.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0041.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0025.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0022.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0053.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0051.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0049.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0046.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0045.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0045.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0044.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0042.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0042.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0026.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0023.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0054.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0052.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0050.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0047.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0046.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0046.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0045.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0043.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0043.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0027.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0024.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0055.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0053.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0051.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0048.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0047.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0047.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0046.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0044.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0044.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0028.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0025.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0056.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0054.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0052.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0049.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0048.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0048.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0047.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0045.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0045.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0029.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0026.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0057.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0055.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0053.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0050.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0049.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0049.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0048.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0046.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0046.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0030.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0027.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0058.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0056.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0054.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0051.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0050.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0050.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0049.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0047.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0047.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0031.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0028.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0059.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0057.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0055.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0052.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0051.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0051.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0050.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0048.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0048.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0032.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0029.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0060.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0058.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0056.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0053.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0052.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0052.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0051.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0049.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0049.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0033.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0030.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0061.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0059.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0057.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0054.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0053.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0053.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0052.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0050.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0050.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0034.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0031.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0062.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0060.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0058.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0055.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0054.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0054.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0053.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0051.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0051.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0035.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0032.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0063.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0061.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0059.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0056.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0055.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0055.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0054.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0052.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0052.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0036.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0033.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0064.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0062.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0060.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0057.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0056.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0056.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0055.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0053.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0053.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0037.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0034.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0065.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0063.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0061.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0058.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0057.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0057.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0056.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0054.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0054.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0038.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0035.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0066.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0064.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0062.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0059.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0058.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0058.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0057.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0055.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0055.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0039.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0036.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0067.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0065.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0063.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0060.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0059.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0059.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0058.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0056.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0056.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0040.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0037.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0068.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0066.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0064.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0061.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0060.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0060.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0059.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0057.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0057.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0041.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0038.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0069.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0067.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0065.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0062.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0061.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0061.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0060.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0058.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0058.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0042.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0039.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0070.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0068.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0066.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0063.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0062.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0062.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0061.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0059.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0059.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0043.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0040.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0071.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0069.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0067.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0064.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0063.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0063.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0062.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0060.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0060.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0044.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0041.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0072.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0070.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0068.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0065.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0064.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0064.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0063.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0061.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0061.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0045.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0042.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0073.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0071.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0069.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0066.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0065.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0065.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0064.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0062.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0062.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0046.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0043.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0074.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0072.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0070.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0067.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0066.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0066.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0065.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0063.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0063.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0047.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0044.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0075.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0073.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0071.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0068.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0067.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0067.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0066.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0064.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0064.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0048.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0045.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0076.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0074.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0072.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0069.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0068.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0068.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0067.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0065.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0065.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0049.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0046.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0077.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0075.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0073.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0070.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0069.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0069.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0068.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0066.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0066.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0050.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0047.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0078.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0076.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question the utility of trying to >> optimize around questionable drivers vs pointing out the problems. >> >> Gautam has been doing some testing of bluetooth drivers >> recently and may >> have more observations. >> >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Friday, October 12, 2007 5:18 AM >> To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX port scanning on Vista? >> >> Hi all, >> >> We have a Windows Vista machine with two "ordinary" >> serial ports (COM1; COM3) plus two virtual serial >> ports: COM7 and COM10 are reserved for bluetooth modems >> though typically >> not connected. >> >> The previous incarnation of our application used the Sun javacomm >> library, and detected all 4 ports instantly, without any delay. >> >> Our latest release is scheduled to use RXTX-2.1-7r2, and we see the >> following: >> * RXTX takes about 30 seconds trying to detect >> the ports, but only finds COM1 and COM3 >> >> It looks like the RXTX method of finding COM ports is not optimal on >> Windows. Is this a known issue? Is there a bugzilla item for it? Is >> there anything we can do about it? >> >> By code inspection we found one workaround: run >> java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 >> switches off port scanning to avoid the delay, but it keeps the ports >> fixed. I'm wondering if there is any better way to address this. >> >> Thanks, >> Martin >> >> >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Tuesday, September 04, 2007 4:15 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RE: RXTX mailing list archives? >> >> Hi Martin, >> >> My apologies for the delays. I've been putting all my free time into >> getting qbang back up. Sadly, I have had little free time until now >> with 3 trips. >> >> I spent considerable time restoring qbang.org last weekend from a >> hardware failure. I looks like everything is going to be OK but the >> mail-list in particular is going to need more work. It is there but >> some of it is inodes in lost+found. I hope to ship the server back to >> Colorado this week. The wiki is also OK. >> >> The main difficulty I've had is moving the data from old to new drives >> with limited bays/connections for the SATA drives. >> >> Once I send the machine back, I'll start verifying the list against my >> personal email folder. >> >> -----Original Message----- >> From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] >> Sent: Tuesday, September 04, 2007 5:42 AM >> To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi >> Cc: Stieber, Uwe; Gutschelhofer, Martin >> Subject: RXTX mailing list archives? >> >> Hi Trent, >> >> the RXTX mailing list archives are still not accessible from >> http://mailman.qbang.org/pipermail/rxtx/ >> The other qbang services are also down, e.g. bugzilla >> http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse >> >> Are they going to come back up, or will they be lost forever? >> >> I'm still looking for an answer for attached question, we'll >> need to get >> that issue fixed for our release. >> For Eclipse, we're releasing Sept. 25 so I'd really like to >> know soon... >> >> Thanks, >> -- >> Martin Oberhuber >> Wind River Systems, Inc. >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ng_agi at abv.bg Fri Dec 5 10:47:29 2008 From: ng_agi at abv.bg (Angelina Velinska) Date: Fri, 5 Dec 2008 19:47:29 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Hello, i am writing a byte[] to a serial port with the method outputstream.write(byte[]) or outputstream.write(byte[], offset, byte[].length). Unfortunatelly, the resulting byte[] is twice as long as it should be. For comparison, when i write my byte[] to the serial port, it is 187 bytes long, and when i write it to System.out.print it is 95. Is there some additional operation on the data that is done when one calls outputstream.write() ? please, give me a hint if there is some more manuals or tutorial info on rxtx library. thanks a lot ng_agi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081205/c2759e7d/attachment-0074.html From netbeans at gatworks.com Fri Dec 5 19:45:40 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 05 Dec 2008 21:45:40 -0500 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> References: <1964406038.12768.1228499249148.JavaMail.apache@mail53.abv.bg> Message-ID: <4939E754.6070205@gatworks.com> Can u give a hint at that the extra character(s) are ( or look like ) ? > Unfortunatelly, the resulting byte[] is twice as long as it should be. > For comparison, when i write my byte[] to the serial port, it is 187 > bytes long, and when i write it to System.out.print it is 95. From ng_agi at abv.bg Tue Dec 9 00:20:30 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 09:20:30 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <578495099.18993.1228807230216.JavaMail.apache@mail51.abv.bg> Hi, thank you for the fast reply. these are the byte[] sequences. The first one is the output of System.out.println, and the second from outputstream.write(). They should be completely identical. 12101048565257659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659899100101102103104105106107108109110111112113114115116117118119120121122659810290001310 121010-2-1048056052056-2-1065098099010001010102010301040105010601070108010901100111011201130114011501160117011801190120012101220650980990100010101020103010401050106010701080109011001110112011301140115011601170118011901200121012206509809901000101010201030104010501060107010801090110011101120113011401150116011701180119012001210122065098928200-2-1013010 thank you for the advice! ng_agi >-------- ?????????? ????? -------- >??: "U. George" >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: Angelina Velinska >????????? ??: ??????, 2008, ???????? 6 04:45:40 EET >Can u give a hint at that the extra character(s) are ( or look like ) ? > > >> Unfortunatelly, the resulting byte[] is twice as long as it should be. >> For comparison, when i write my byte[] to the serial port, it is 187 >> bytes long, and when i write it to System.out.print it is 95. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/c8d09c99/attachment-0071.html From ng_agi at abv.bg Tue Dec 9 13:36:36 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:36:36 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1447712330.6475.1228854998506.JavaMail.apache@mail54.abv.bg> ... continuing the previous post.... For example when i write byte[4] containing the values in int 2121, i receive the following: (1) (2) -2 50 -1 49 0 50 50 49 0 49 0 50 0 49 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print (to standart output console). ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/e40f984d/attachment-0070.html From ng_agi at abv.bg Tue Dec 9 13:40:00 2008 From: ng_agi at abv.bg (ng _agi) Date: Tue, 9 Dec 2008 22:40:00 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> one more time with normal sequences... (1)-2-1050049050049 (2)50495049 (1) is what is written to serial port outputStream.write() , (2) is what is written to System.out.print() ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.phps -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081209/746d8cfa/attachment-0070.html From linuxguy123 at gmail.com Tue Dec 9 23:59:33 2008 From: linuxguy123 at gmail.com (Linuxguy123) Date: Tue, 09 Dec 2008 23:59:33 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? Message-ID: <1228892374.3839.14.camel@localhost.localdomain> I installed rxtx in Eclipse by 1) opening Eclipse 3.4, Help->Software Updates-> Available Software 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK packages. They install without errors. Now what do I do ? The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) talks about copying jars and dlls into the project. I used to do that in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse itself. Shouldn't there be a way to add the rxtx library to my Eclipse project without doing it manually ? Thanks From Martin.Oberhuber at windriver.com Wed Dec 10 03:23:21 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Wed, 10 Dec 2008 11:23:21 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <460801A4097E3D4CA04CC64EE648584808C83E68@ism-mail03.corp.ad.wrs.com> Hi, so you want to drive RXTX from your own program? Having imported the RXTX SDK, you have the sources. You can now File > Import > Plug-in development > Plug-ins and Features > Option: Link into Target Platform > pick RXTX plugin Now you should have the RXTX project in your workspace. You can browse its sources and APIs. Create your own Java or plug-in project. Adjust the Java Classpath via properties, such that your project depends on the RXTX project. For runtime, also edit the MANIFEST.MF of your plug-in project to "depend" on rxtx plugin. Start hacking away :-) If you want some sample source code under EPL, get the TM Terminal plugins out of the Eclipse TM CVS -- just import the Team Project set (anonymous CVS) from http://www.eclipse.org/dsdp/tm/development/cvs_setup.php the org.eclipse.tm.terminal.serial contains the RXTX integration. HTH, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Linuxguy123 > Sent: Wednesday, December 10, 2008 8:00 AM > To: rxtx at qbang.org > Subject: [Suspected Spam][Blocked Sender][Rxtx] How do I use > rxtx if I installed the package in Eclipse ? > > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? > > The wiki (http://rxtx.qbang.org/wiki/index.php/Using_RXTX_In_Eclipse) > talks about copying jars and dlls into the project. I used to do that > in Eclipse 3.2, when I couldn't import the rxtx library with Eclipse > itself. > > Shouldn't there be a way to add the rxtx library to my Eclipse project > without doing it manually ? > > Thanks > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From michael.erskine at ketech.com Wed Dec 10 08:12:21 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Wed, 10 Dec 2008 15:12:21 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> References: <1209878557.7165.1228855208226.JavaMail.apache@mail53.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44F9F92DDAD@no-sv-03.ketech.local> > Sent: 09 December 2008 20:40 > To: ng _agi > Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) > > one more time with normal sequences... > > (1)-2-1050049050049 > (2)50495049 > > (1) is what is written to serial port outputStream.write() , > (2) is what is written to System.out.print() Looks fine to me :) The first is a sequence of bytes: these are 8-bit and signed. The second is a char sequence: these are 16-bit and unsigned. Regards, Michael Erskine. From saburchtx at alltel.net Wed Dec 10 14:16:14 2008 From: saburchtx at alltel.net (Scott Alan Burch) Date: Wed, 10 Dec 2008 15:16:14 -0600 Subject: [Rxtx] very basic Java questions about serial port Message-ID: <4940319E.8020900@alltel.net> I am trying to make an interface that sends ASCII codes to a piece of equipment. The method connect below sends a string that establishes communication , and the commOffDisconnect method stops communication. Each of these methods has a button associated with them. So far, the connect method works fine: pressing the button establishes communication via the RS232 port and sends the ASCII code through. When I try to disconnect using commOffDisconnect, I get the "Error: Port is currently in use" warning. I take it that commOffDisconnect is trying to re-open an already open port. So that's the wrong approach -- that's the code below. Since the port is open, how can I get the next ASCII string into the outputstream? Side issue: The code in commOffDisconnect below will not compile because the serialPort variable has not been initialized. I thought about this as an alternate approach: try { // outputStream.write(messageString.getBytes()); // } catch (IOException e) {} but is the outputStream in commOffDisconnect the same stream as the one in connect? thanks! +++++++ void connect ( String portName ) throws Exception { String defaultPort = "/dev/ttyS0"; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 49, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(4800,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } else { System.out.println("Error: Only serial ports are handled by this application."); } } } @SuppressWarnings("empty-statement") void commOffDisconnect ( String portName) throws Exception { String defaultPort = "/dev/ttyS0"; SerialPort serialPort; Charset asciiCharset = Charset.forName("US-ASCII"); CharsetDecoder decoder = asciiCharset.newDecoder(); byte h[] = {33, 48, 48, 66, 67, 78, 48, 13}; ByteBuffer asciiBytes = ByteBuffer.wrap(h); CharBuffer hChars = null; try { hChars = decoder.decode(asciiBytes); } catch (CharacterCodingException e) { System.err.println("Error decoding"); System.exit(-1); } System.out.println(hChars); InputStream in = serialPort.getInputStream(); OutputStream out = serialPort.getOutputStream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); out.write(h); out.flush(); } From ng_agi at abv.bg Thu Dec 11 02:57:52 2008 From: ng_agi at abv.bg (ng _agi) Date: Thu, 11 Dec 2008 11:57:52 +0200 (EET) Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) Message-ID: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Hello Michael, thanks for th eanswer. i am writing 50495049 to the serial but the output is -2-1050049050049. so i have (-2-10) preceeding my data. I need to have (50495049) only as output as the first bytes sent are control ones. If i have some noise or other information preceeding my actual data, my receiving device will not "recognize" the data packet sent. unfortunatelly i dont know why do i get the initial (-2-10) data. i would appreciate advice on the cause. thank you ng_agi >-------- ?????????? ????? -------- >??: Michael Erskine >???????: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >??: "rxtx at qbang.org" >????????? ??: ?????, 2008, ???????? 10 17:12:21 EET >> Sent: 09 December 2008 20:40 >> To: ng _agi >> Cc: > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) >> >> one more time with normal sequences... >> >> (1)-2-1050049050049 >> (2)50495049 >> >> (1) is what is written to serial port outputStream.write() , >> (2) is what is written to System.out.print() > >Looks fine to me :) >The first is a sequence of bytes: these are 8-bit and signed. >The second is a char sequence: these are 16-bit and unsigned. > >Regards, >Michael Erskine. > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > ----------------------------------------------------------------- ?????????? ??? ??????? ??? ????????? ???? ?? ????????????! http://test.photosynthesis.bg/ ----------------------------------------------------------------- ????????? ?????? ???????? ?? ???????????, ???? ? ???? ????????! http://www.technomarket.bg/howto.php ----------------------------------------------------------------- ??????? ?? ??????? On Line ? ????????? ???????? ?? 48 ????! http://www.partytime-bg.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081211/5082c0c5/attachment-0069.html From michael.erskine at ketech.com Thu Dec 11 04:25:56 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Thu, 11 Dec 2008 11:25:56 +0000 Subject: [Rxtx] outputstream.write(byte[], offset, byte[].length) In-Reply-To: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> References: <483073227.44891.1228989481614.JavaMail.apache@mail54.abv.bg> Message-ID: <06BA3262D918014F9183B66425D5A8D44FA071FD55@no-sv-03.ketech.local> > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ng _agi > Sent: 11 December 2008 09:58 > Subject: Re: [Rxtx] outputstream.write(byte[], offset, byte[].length) Hi ng_agi, > i am writing 50495049 to the serial but the output is -2-1050049050049. > so i have (-2-10) preceeding my data. I need to have (50495049) only as > output as the first bytes sent are control ones. If i have some noise > or other information preceeding my actual data, my receiving device > will not "recognize" the data packet sent. > unfortunatelly i dont know why do i get the initial (-2-10) data. > i would appreciate advice on the cause. Post your code and we can tell you what's going on. Regards, Michael Erskine. From thisdyingdream at gmail.com Thu Dec 11 11:48:48 2008 From: thisdyingdream at gmail.com (Steven Harms) Date: Thu, 11 Dec 2008 13:48:48 -0500 Subject: [Rxtx] RXTX on Linux Message-ID: I am working with RXTX-2.1-7 and have changed everything to javax.comm for a legacy application. We are having a lot of problems with a receipt printer device on /dev/lp0. Looking at an strace, it shows many EAGAIN messages. I edited the read_array calls to loop the read while errno == EAGAIN, but it never got the data (which I don't understand because the select call returns ret=1 meaning there is data on our /dev/lp0 FD). Anyone have any suggestions? The dmesg output for parport is: parport: PnPBIOS parport detected. parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP] lp0: using parport0 (interrupt-driven). -- GPG Key ID: C92EF367 / 1428 FE8E 1E07 DDA8 EFD7 195F DCCD F5B3 C92E F367 From jledet at space.aau.dk Fri Dec 12 01:31:44 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 09:31:44 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? Message-ID: <49422170.4020901@space.aau.dk> Hi I'm writing a program that uses RXTX. When I run the program in Eclipse it works as it should, but when I run my program in a terminal, "Experimental: JNI_OnLoad called" is printed in the middle of my output. Does Eclipse add some magic jvm argument to remove this? If an exception is thrown, e.g. when the serial port doesn't exist, "Experimental: JNI_OnLoad called" is printed both in Eclipse and in the terminal. I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about version, but "Experimental: JNI_OnLoad called" is still there. Thank you in advance. /Jeppe From Martin.Oberhuber at windriver.com Fri Dec 12 03:37:27 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Fri, 12 Dec 2008 11:37:27 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Hi Jeppe, the code which is responsible for printing the "Experimental: JNI_OnLoad" is in the RXTX native compiled code. See also this comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 To get rid of it, you need to compile the RXTX sharedlib yourself. What is your host platform? Linux? What kind of Linux? I think that we'll soon start building release candidates for RXTX 2.2, these will also have the printout removed. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Jeppe Ledet-Pedersen > Sent: Friday, December 12, 2008 9:32 AM > To: rxtx at qbang.org > Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? > > Hi > > I'm writing a program that uses RXTX. When I run the program > in Eclipse > it works as it should, but when I run my program in a terminal, > "Experimental: JNI_OnLoad called" is printed in the middle of my > output. Does Eclipse add some magic jvm argument to remove > this? If an > exception is thrown, e.g. when the serial port doesn't exist, > "Experimental: JNI_OnLoad called" is printed both in Eclipse > and in the > terminal. > > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. > > Thank you in advance. > > /Jeppe > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jledet at space.aau.dk Fri Dec 12 04:48:42 2008 From: jledet at space.aau.dk (Jeppe Ledet-Pedersen) Date: Fri, 12 Dec 2008 12:48:42 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> References: <49422170.4020901@space.aau.dk> <460801A4097E3D4CA04CC64EE648584808D2263C@ism-mail03.corp.ad.wrs.com> Message-ID: <49424F9A.2020007@space.aau.dk> Hi Martin I'm using Arch Linux. I'll try to compile the libraries from source. I just wondered if there was an option to remove it since eclipse doesn't show it. Thank you for your help. /Jeppe Oberhuber, Martin wrote: > Hi Jeppe, > > the code which is responsible for printing the > "Experimental: JNI_OnLoad" > is in the RXTX native compiled code. See also this comment: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=173629#c5 > > To get rid of it, you need to compile the RXTX sharedlib yourself. > What is your host platform? Linux? What kind of Linux? > > I think that we'll soon start building release candidates for > RXTX 2.2, these will also have the printout removed. > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] >> On Behalf Of Jeppe Ledet-Pedersen >> Sent: Friday, December 12, 2008 9:32 AM >> To: rxtx at qbang.org >> Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? >> >> Hi >> >> I'm writing a program that uses RXTX. When I run the program >> in Eclipse >> it works as it should, but when I run my program in a terminal, >> "Experimental: JNI_OnLoad called" is printed in the middle of my >> output. Does Eclipse add some magic jvm argument to remove >> this? If an >> exception is thrown, e.g. when the serial port doesn't exist, >> "Experimental: JNI_OnLoad called" is printed both in Eclipse >> and in the >> terminal. >> >> I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about >> version, but "Experimental: JNI_OnLoad called" is still there. >> >> Thank you in advance. >> >> /Jeppe >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> From onculkorkut at gmail.com Fri Dec 12 05:34:01 2008 From: onculkorkut at gmail.com (=?ISO-8859-1?Q?=F6nc=FCl_korkut?=) Date: Fri, 12 Dec 2008 14:34:01 +0200 Subject: [Rxtx] out.write(byte[] ) Message-ID: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> hi. I am pretty a beginner in java programming. and I started to use RXTX library for a GPS reader. I can read the values from GPS (which is flowcontrol independent in Hyperterm) however I could not send any commands to the port. the only spec for send operation is xon/xoff control. to achieve I wrote: //4800-8-N-1 serialPort.setSerialParams (bdRate, dataBits, stopBits, parity,); serialPort.setFlowControl(FLOWCONTROL_XONXOFF_IN| FLOWCONTROL_XONXOFF_OUT); serialPort.enableReceiveTimeout(1000); ...//same as the examples section (2 threads) and In CommWriter class I have : this.write (writtenData ); //in this point I have debugged well, I have to send ASCII Format and these are the output sentences: System.out.write(writtenData); $PSRF103,03,00,00,01*27 for (int i=0; i< writtenData.length;++i) System.out.print(" " + (int) writtenData[i]); 36 80 83 82 70 49 48 51 44 ... (and correct ascii values goes on for printable ones ) and 13 10 (CR LF) although I can use this command (and see the desired behavior from Hyperterminal) , the gps device does not respond to this operation. I am pretty uncertain about how top set up flow control. and I couldn't find any tutor or information on setting up the xon/xoff flow control. could you please give me some information on setting up flow control? thx in advance. From Steffen.DETTMER at ingenico.com Fri Dec 12 07:18:02 2008 From: Steffen.DETTMER at ingenico.com (Steffen DETTMER) Date: Fri, 12 Dec 2008 15:18:02 +0100 Subject: [Rxtx] How do I get rid of "Experimental: JNI_OnLoad called"? In-Reply-To: <49422170.4020901@space.aau.dk> References: <49422170.4020901@space.aau.dk> Message-ID: <20081212141802.GA30886@elberon.bln.de.ingenico.com> * Jeppe Ledet-Pedersen wrote on Fri, Dec 12, 2008 at 09:31 +0100: > I use -Dgnu.io.rxtx.NoVersionOutput=true to remove some output about > version, but "Experimental: JNI_OnLoad called" is still there. Maybe it is a STDOUT or STDERR message not showing up in eclipse because in eclipse at least of of it is broken/closed/redirected? Just in case maybe the following hack^Wtrick helps? ------------------------------------------------------------------->8======= From: Michael Erskine To: "rxtx at qbang.org" Subject: Re: [Rxtx] Undisplay "Stable library" Date: Thu, 4 Sep 2008 14:36:36 +0100 > Hi, is there a way to use RXTX library without writing text: > "Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7" > > into console window just after calling "getPortIdentifiers()" method? Yes, prior to any calls that would cause the classloader to pull in RXTX, redirect standard output to a temporary PrintStream (with java.lang.System.setOut() ) and then restore later if required! =======8<------------------------------------------------------------------- oki, Steffen About Ingenico Throughout the world businesses rely on Ingenico for secure and expedient electronic transaction acceptance. Ingenico products leverage proven technology, established standards and unparalleled ergonomics to provide optimal reliability, versatility and usability. This comprehensive range of products is complemented by a global array of services and partnerships, enabling businesses in a number of vertical sectors to accept transactions anywhere their business takes them. www.ingenico.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From ksligphone at gmail.com Fri Dec 12 16:59:51 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Fri, 12 Dec 2008 18:59:51 -0500 Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: <3bc4b57d0812121559o20abb521re26d9985e457a3ce@mail.gmail.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. On Wed, Dec 3, 2008 at 8:00 PM, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081212/eb0cfca0/attachment-0067.html From ksligphone at gmail.com Fri Dec 12 17:49:44 2008 From: ksligphone at gmail.com (ksligphone at gmail.com) Date: Sat, 13 Dec 2008 00:49:44 +0000 Subject: [Rxtx] No Ports showing up at run time Message-ID: <0016362835a65740c7045de2fcbc@google.com> Ok I am still slamming by head against a wall here, my first post was incorect in the fact that I am using NetBeans 6.1 not 6.5, but that still should not make a differece, All I am trying to do is get a list of the Serial Ports on the System and put them in a DropDown List box here is the code I am using to do this package retrosignserver; import gnu.io.CommPortIdentifier; import java.util.Enumeration; /** * * @author Khaled */ public class PortList { public PortList() { } public Enumeration GetPortList() { Enumeration pList=null; pList = CommPortIdentifier.getPortIdentifiers(); return pList; } } This is is the part of the dialog that fails private void formWindowOpened(java.awt.event.WindowEvent evt) { PortList p = new PortList(); Enumeration Plist = p.GetPortList(); //This did not work either //Enumeration PList=null; //PList = CommPortIdentifier.getPortIdentifiers(); while (Plist.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier) Plist.nextElement(); cboB1ComPort.addItem(cpi.getName()); } } I thought maybe it is because the code was being executed from within the formWindowOpened event but it behaves the same way when as someone else sugjested I place the code in constructer right after the initComponets method call. The problem is the program works like a charm when it is executed from inside the IDE, however if executed standalone outside the IDE, the GetPortList Method just stalls out and program execution seems to stop there, I have ran the same code under Ubuntu 7 , Windows XP Pro, and Windows Vista Ultimate, and still the same problem. Please if any of you have can shed some light on the subject I would really appreciate it. Edit::: I have also tried to run the Jar file in the command line on windows XP, and this is what I get java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSe rial in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at retrosignserver.PortList.GetPortList(PortList.java:30) at retrosignserver.RetroSignServer.(RetroSignServer.java:29) at retrosignserver.RetroSignServer$6.run(RetroSignServer.java:245) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Anyone can shed some light -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081213/3d05d769/attachment-0067.html From tjarvi at qbang.org Fri Dec 12 18:00:19 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 12 Dec 2008 18:00:19 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <0016362835a65740c7045de2fcbc@google.com> References: <0016362835a65740c7045de2fcbc@google.com> Message-ID: > java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown > while > loading gnu.io.RXTXCommDriver > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no > rxtxSe > rial in java.library.path I'm not a NetBeans user so someone else may help there. The above is a common install problem. The native library is no found by loadlibrary. This is probably in the wiki too but I documented the solution(s) in the INSTALL with the rxtx src originally. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7/INSTALL B. Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path librxtxSerial.so is located in the wrong directory. Here is an example $ mv /usr/local/java/jre/lib/i386/librxtxSerial* /usr/local/lib $ java BlackBox Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Compiled Code) at java.lang.System.loadLibrary(Compiled Code) at gnu.io.NativePort.(NativePort.java:32) at gnu.io.RXTXPort.(Compiled Code) at gnu.io.RXTXCommDriver.getCommPort(Compiled Code) at gnu.io.CommPortIdentifier.open(Compiled Code) at SerialPortDisplay.openBBPort(Compiled Code) at SerialPortDisplay.(Compiled Code) at BlackBox.addPort(Compiled Code) at BlackBox.main(Compiled Code) ... lets fix it. Solution 1: move the file to a place that works $ mv /usr/local/lib/librxtxSerial.* /usr/local/java/jre/lib/i386/ Solution 2: add the location of librxtxSerial to LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ Solution 3: pass the location in on the command line $ java -Djava.library.path=/usr/local/lib/ ... -- Trent Jarvi tjarvi at qbang.org From michael.erskine at ketech.com Mon Dec 15 01:49:27 2008 From: michael.erskine at ketech.com (Michael Erskine) Date: Mon, 15 Dec 2008 08:49:27 +0000 Subject: [Rxtx] out.write(byte[] ) In-Reply-To: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> References: <9dc0eee80812120434k3a71e24duc91ee279c773fb67@mail.gmail.com> Message-ID: <06BA3262D918014F9183B66425D5A8D44FACE4E79B@no-sv-03.ketech.local> > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of ?nc?l korkut > and I couldn't > find any tutor or information on setting up the xon/xoff flow control. > could you please give me some information on setting up flow control? http://letmegooglethatforyou.com/?q=xon/xoff%20flow%20control > thx in advance. My pleasure! Seriously though, if you see the bytes that you sent in Hyperterminal then they were sent fine. If you want to debug serial comms on a Windows platform I'd suggest you use RealTerm with com0com and hub4com. Regards, Michael Erskine. From opensource at cloudhopper.net Mon Dec 15 13:48:37 2008 From: opensource at cloudhopper.net (Joe Lauer) Date: Mon, 15 Dec 2008 12:48:37 -0800 (PST) Subject: [Rxtx] Help - Any Reason why MonitorThread not a Daemon thread? Message-ID: <1036393816.2191229374117390.JavaMail.root@zimbra-01.cloudhopper.lan> Hi, My application won't terminate when the my main thread dies because the MonitorThread in RXTX is not set to be a "daemon" thread. Is there a reason why this thread isn't set to be a daemon? It would be easy to modify the RXTX code -- just set the Monitor thread to a daemon in the constructor. I'll change the code for my own purposes, but I'm wondering if there is a good reason for this? Any info would be much appreciated. Thx. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net From leeview at yahoo.com Wed Dec 17 06:55:48 2008 From: leeview at yahoo.com (Liviu-Marian Negrila) Date: Wed, 17 Dec 2008 05:55:48 -0800 (PST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR Message-ID: <195204.98360.qm@web90507.mail.mud.yahoo.com> Hello, Is it possible to purge the serial port that has been opened with rxtx? I've tried sending TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. /* IOCTL_SERIAL_PURGE constants */ #define SERIAL_PURGE_TXABORT 0x00000001 #define SERIAL_PURGE_RXABORT 0x00000002 #define SERIAL_PURGE_TXCLEAR 0x00000004 #define SERIAL_PURGE_RXCLEAR 0x00000008 Thank you Liviu From tjarvi at qbang.org Wed Dec 17 22:12:54 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 17 Dec 2008 22:12:54 -0700 (MST) Subject: [Rxtx] Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR In-Reply-To: <195204.98360.qm@web90507.mail.mud.yahoo.com> References: <195204.98360.qm@web90507.mail.mud.yahoo.com> Message-ID: On Wed, 17 Dec 2008, Liviu-Marian Negrila wrote: > Hello, > > Is it possible to purge the serial port that has been opened with rxtx? > I've tried sending > > TXABORT & RXABORT & TXCLEAR & RXCLEAR without any luck. > > > /* IOCTL_SERIAL_PURGE constants */ > #define SERIAL_PURGE_TXABORT 0x00000001 > #define SERIAL_PURGE_RXABORT 0x00000002 > #define SERIAL_PURGE_TXCLEAR 0x00000004 > #define SERIAL_PURGE_RXCLEAR 0x00000008 > > You are not the first person to scratch your head :) That must be windows/wince? I don't recall anything in CommAPI that purges. CommAPI is a bit odd (wrong) in this sense and it has confused people in the past. What you ask for could be added as an extension but let me briefly explain why it isn't there. What are the standard terms? POSIX: drain (TCDRAIN): make sure all the data is written. flush (TCFLUSH): dump all the data. What does CommAPI call them? CommAPI: flush: make sure all the data is written. Ooops: no function for dumping data exists. How do these fit together? RXTX aims to be a POSIX compliant implementation of CommAPI. That means when people say flush in java, rxtx drains. When OS's don't support POSIX, we do it for them. We could 'purge' on all OS's but CommAPI does not support it. Do you feel lucky? I'd suggest that maybe all you need to do is discard all the bytes available and 'purge' isn't required. Fixing the problem above is going to create more problems than it solves without going through a JSR or like agreement of minds. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 11:32:59 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 13:32:59 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? Message-ID: <494BE8DB.8010101@gatworks.com> downloaded rxtx-2.1-7r2 did a cvs update did a configure did a make got: /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: No such file or directory From tjarvi at qbang.org Fri Dec 19 14:42:43 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 14:42:43 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494BE8DB.8010101@gatworks.com> References: <494BE8DB.8010101@gatworks.com> Message-ID: On Fri, 19 Dec 2008, U. George wrote: > downloaded rxtx-2.1-7r2 > did a cvs update > did a configure > did a make > > got: > /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: > /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: > No such file or directory > Hi George, Odd. Are you trying to build on a second platform? Some of the logic is wrong for trees that have already built the jar. I usually create a directory in the rxtx tree for each platform built - especially while working on a nfs drive or using a cross compiler. mkdir glinux cd glinux ../configure && make The autogen.sh may be of use if something has changed in autobreak. -- Trent Jarvi tjarvi at qbang.org From netbeans at gatworks.com Fri Dec 19 16:30:39 2008 From: netbeans at gatworks.com (U. George) Date: Fri, 19 Dec 2008 18:30:39 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> Message-ID: <494C2E9F.60800@gatworks.com> Well, if you: download zipfile, and unpack, cvs update configure make THIS DOES NOT BUILD. BUT download zipfile, unpack. configure make cvs update make This appears to build without issues. Trent Jarvi wrote: > > > On Fri, 19 Dec 2008, U. George wrote: > >> downloaded rxtx-2.1-7r2 >> did a cvs update >> did a configure >> did a make >> >> got: >> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >> >> No such file or directory >> > > Hi George, > > Odd. Are you trying to build on a second platform? Some of the logic is > wrong for trees that have already built the jar. > > I usually create a directory in the rxtx tree for each platform built - > especially while working on a nfs drive or using a cross compiler. > > mkdir glinux > cd glinux > ../configure && make > > The autogen.sh may be of use if something has changed in autobreak. > > -- > Trent Jarvi > tjarvi at qbang.org > > From tjarvi at qbang.org Fri Dec 19 17:27:36 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 19 Dec 2008 17:27:36 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494C2E9F.60800@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: Hi George Ah. We moved the java files so they work in IDEs. use 'cvs update -d' so you get the src/gnu/io/ java files which have been deleted in src/ Your successful build is from old java src and is almost certainly not what you want. 'make clean' should be used before building again. On Fri, 19 Dec 2008, U. George wrote: > Well, if you: > download zipfile, and unpack, > cvs update > configure > make > THIS DOES NOT BUILD. > > BUT > download zipfile, unpack. > configure > make > cvs update > make > > This appears to build without issues. > > Trent Jarvi wrote: >> >> >> On Fri, 19 Dec 2008, U. George wrote: >> >>> downloaded rxtx-2.1-7r2 >>> did a cvs update >>> did a configure >>> did a make >>> >>> got: >>> /bin/sh: line 0: cd: i686-pc-linux-gnu: No such file or directory >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/libtool: line 1184: >>> /home/gat/rxtx/rxtx-2.1-7r2_2/rxtx-2.1-7r2/i686-pc-linux-gnu/SerialImp.loT: >>> No such file or directory >>> >> >> Hi George, >> >> Odd. Are you trying to build on a second platform? Some of the logic is >> wrong for trees that have already built the jar. >> >> I usually create a directory in the rxtx tree for each platform built - >> especially while working on a nfs drive or using a cross compiler. >> >> mkdir glinux >> cd glinux >> ../configure && make >> >> The autogen.sh may be of use if something has changed in autobreak. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > From netbeans at gatworks.com Sat Dec 20 07:45:05 2008 From: netbeans at gatworks.com (U. George) Date: Sat, 20 Dec 2008 09:45:05 -0500 Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> Message-ID: <494D04F1.8000601@gatworks.com> Well, I suppose its all in the DOC's . Any contemplated changes to the published web docs? Trent Jarvi wrote: > > Hi George > > Ah. We moved the java files so they work in IDEs. > > use 'cvs update -d' so you get the src/gnu/io/ java files which have > been deleted in src/ > > Your successful build is from old java src and is almost certainly not > what you want. 'make clean' should be used before building again. > From tjarvi at qbang.org Sat Dec 20 08:13:24 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 20 Dec 2008 08:13:24 -0700 (MST) Subject: [Rxtx] rebuilding RXTX: where is i686-pc-linux-gnu ? In-Reply-To: <494D04F1.8000601@gatworks.com> References: <494BE8DB.8010101@gatworks.com> <494C2E9F.60800@gatworks.com> <494D04F1.8000601@gatworks.com> Message-ID: Hi George, The plan is to redirect www.rxtx.org to rxtx.qbang.org which is a wiki. If you note a problem you can mention it here or just change it yourself. To be honest, I'm still testing the next release and have not looked at documentation yet. Note that if you just cvs checkout the source, the issue you ran into will not show up. If you want to clean up any documentation, I'm more than willing to give you everything you need. On Sat, 20 Dec 2008, U. George wrote: > Well, I suppose its all in the DOC's . > > Any contemplated changes to the published web docs? > > Trent Jarvi wrote: >> >> Hi George >> >> Ah. We moved the java files so they work in IDEs. >> >> use 'cvs update -d' so you get the src/gnu/io/ java files which have been >> deleted in src/ >> >> Your successful build is from old java src and is almost certainly not what >> you want. 'make clean' should be used before building again. >> > From mhz at bitstream.net Tue Dec 23 13:02:56 2008 From: mhz at bitstream.net (mhz at bitstream.net) Date: Tue, 23 Dec 2008 15:02:56 -0500 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier Message-ID: Hi. New subscriber and first-time poster here. I was referred to the list by Trent Jarvi. I am not a developer, just a fairly average PC user who has tried diligently to find a solution to my issue and cannot. I'm posting here in hopes of getting an answer. The issue is javax.comm. The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). Problem: A newly-installed application, JXM (http://javaxm.sourceforge.net/), cannot fire up due to the following error: java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier This is where I get lost and can't locate a resolution - and I've searched. I installed the FTIUSBSerialDriver as directed in the app's readme. Still no luck. So, my question is how do I get javax.comm working? Is it properly installed? If not, how is it done? Or if it is installed, why is it not being recognized? What must I do to get it working? Again, I am not a gear head - but I'm not clueless noob grandma, either. Thanks in advance for your help. Alan From dev+lists at humph.com Tue Dec 23 17:30:40 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 01:30:40 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: Message-ID: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > Hi. New subscriber and first-time poster here. I was referred to the > list by Trent Jarvi. > > I am not a developer, just a fairly average PC user who has tried > diligently to find a solution to my issue and cannot. I'm posting > here in hopes of getting an answer. > > The issue is javax.comm. > > The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). > > Problem: A newly-installed application, JXM > (http://javaxm.sourceforge.net/), cannot fire up due to the following > error: > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier it seem to me that JXM uses the RXTX version which relies on javax.comm. So you need javax.comm installed. In the Info.plist of the JXM application package they point to an embedded comm.jar, but presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ and download the generic version and put it either as comm.jar in the application bundle where jxm.jar is, or in the /Library/Java/ Extensions folder. g From tjarvi at qbang.org Tue Dec 23 17:52:12 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 23 Dec 2008 17:52:12 -0700 (MST) Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: On Wed, 24 Dec 2008, Giuliano Gavazzi wrote: > > On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> >> java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier > > it seem to me that JXM uses the RXTX version which relies on > javax.comm. So you need javax.comm installed. In the Info.plist of the > JXM application package they point to an embedded comm.jar, but > presumably they are not allowed to actually distribute it. So go to http://java.sun.com/products/javacomm/ > and download the generic version and put it either as comm.jar in > the application bundle where jxm.jar is, or in the /Library/Java/ > Extensions folder. > I'm not exactly sure what the project is about so I suggested posting here. This looked like an unusual dependency (especially for mac). I was flustered with the packaging of jxm when I went to take a quick look. It should be possible for them to ship the rxtx gnu.io package and not require the extra downloads. The requirement that makes shipping Sun's comm.jar is a sourceforge one from what I gather. They must provide source for everything they offer to download. rxtx could help there. I don't view rxtx's goal is to replace javax.comm. Options are good for everyone. But in this case, it appears the best option for the users was not used when you consider the requirements. We can and would help if there is interest from the JXM developers. -- Trent Jarvi tjarvi at qbang.org From Bob_Jacobsen at lbl.gov Tue Dec 23 18:44:57 2008 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 23 Dec 2008 17:44:57 -0800 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: >On T 23 Dec, 2008, at 21:02 , mhz at bitstream.net wrote: > >> Hi. New subscriber and first-time poster here. I was referred to the >> list by Trent Jarvi. >> >> I am not a developer, just a fairly average PC user who has tried >> diligently to find a solution to my issue and cannot. I'm posting >> here in hopes of getting an answer. >> >> The issue is javax.comm. >> >> The basics: I'm using Mac OSX 10.5 Leopard on a MacBook Pro (new). >> >> Problem: A newly-installed application, JXM >> (http://javaxm.sourceforge.net/), cannot fire up due to the following >> error: >> > > java.lang.ClassNotFoundException: javax.comm.CommPortIdentifier You could try downloading an RXTX installer from here: and running it. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From dev+lists at humph.com Wed Dec 24 09:03:58 2008 From: dev+lists at humph.com (Giuliano Gavazzi) Date: Wed, 24 Dec 2008 17:03:58 +0100 Subject: [Rxtx] Help with javax.comm.CommPortIdentifier In-Reply-To: References: <0DE167DB-CD97-4BB7-B5E3-03FE469FC5CE@humph.com> Message-ID: <563C4A95-31C7-4A1D-B0FC-4E2FF5974A19@humph.com> On W 24 Dec, 2008, at 02:44 , Bob Jacobsen wrote: > You could try downloading an RXTX installer from here: > > download> > > and running it. but then he should also recompile JXM to change the import lines. I tested the application by adding the comm.jar file to the Java directory in the application package and it runs. The comm.jar is part of the 2.0.3 version (beta) of the comm api, and comes with a license file that mentions a 90 days validity, however the Readme file clashes somehow with this declaration. At startup JXM says that there is a new version, but if one proceeds with the download it simply opens one of those generic advert/link domains. Giuliano From lyon at docjava.com Sat Dec 27 07:00:12 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:00:12 -0500 Subject: [Rxtx] how do you dynamically reload native libraries? Message-ID: Hi All, I am trying to test multiple versions of the RXTX native libraries in a single JVM. Each RXTX library instance can share a single virtual machine, but must have an isolated context class loader. A context class loader maps a thread to specific classes and resources. When the thread dies, the classes and resources are freed. Is there some way to have multiple context class loaders that can load different native method library implementations? Thanks! - Doug From lyon at docjava.com Sat Dec 27 07:58:05 2008 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 27 Dec 2008 09:58:05 -0500 Subject: [Rxtx] JNI_OnLoad Message-ID: Hi All, It appears that the method "JNI_OnLoad" must be implemented in RXTX in order to take advantage of the new class loader features. Do we implement JNI_OnLoad? If not, do we plan to? Thanks! - Doug P.S. Here is the background: http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html says that: As of JDK/JRE 1.1, once a native library is loaded, it is visible from all class loaders. Therefore two classes in different class loaders may link with the same native method. This leads to two problems: * A class may mistakenly link with native libraries loaded by a class with the same name in a different class loader. * Native methods can easily mix classes from different class loaders. This breaks the name space separation offered by class loaders, and leads to type safety problems. As of JDK/JRE 1.2, each class loader manages its own set of native libraries. The same JNI native library cannot be loaded into more than one class loader. Doing so causes UnsatisfiedLinkError to be thrown. For example, System.loadLibrary throws an UnsatisfiedLinkError when used to load a native library into two class loaders. The benefits of the new approach are: * Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders. * In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected. JDK/JRE 1.4 In order to use the JNI functions introduced in J2SE release 1.2, in addition to those that were available in JDK/JRE 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. In order to use the JNI functions introduced in J2SE release 1.4, in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded. From tjarvi at qbang.org Sat Dec 27 09:46:47 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 27 Dec 2008 09:46:47 -0700 (MST) Subject: [Rxtx] JNI_OnLoad In-Reply-To: References: Message-ID: On Sat, 27 Dec 2008, Dr. Douglas Lyon wrote: > Hi All, > It appears that the method "JNI_OnLoad" must be implemented > in RXTX in order to take advantage of the new class loader features. > > Do we implement JNI_OnLoad? If not, do we plan to? > > Thanks! > - Doug > P.S. > > Here is the background: > http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html > > says that: > As of JDK/JRE 1.1, once a native library is loaded, it is visible > from all class loaders. Therefore two classes in different class > loaders may link with the same native method. This leads to two > problems: > > * A class may mistakenly link with native libraries loaded by a > class with the same name in a different class loader. > * Native methods can easily mix classes from different class > loaders. This breaks the name space separation offered by class > loaders, and leads to type safety problems. > > As of JDK/JRE 1.2, each class loader manages its own set of native > libraries. The same JNI native library cannot be loaded into more > than one class loader. Doing so causes UnsatisfiedLinkError to be > thrown. For example, System.loadLibrary throws an > UnsatisfiedLinkError when used to load a native library into two > class loaders. The benefits of the new approach are: > > * Name space separation based on class loaders is preserved in > native libraries. A native library cannot easily mix classes from > different class loaders. > * In addition, native libraries can be unloaded when their > corresponding class loaders are garbage collected. > > JDK/JRE 1.4 > > In order to use the JNI functions introduced in J2SE release 1.2, > in addition to those that were available in JDK/JRE 1.1, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_2. > > In order to use the JNI functions introduced in J2SE release 1.4, > in addition to those that were available in release 1.2, a native > library must export a JNI_OnLoad function that returns > JNI_VERSION_1_4. > > If the native library does not export a JNI_OnLoad function, the > VM assumes that the library only requires JNI version > JNI_VERSION_1_1. If the VM does not recognize the version number > returned by JNI_OnLoad, the native library cannot be loaded. Hi Doug: The following is in rxtx now. I don't think there is a problem in upping the JNI_VERSION. I only used it to get the JVM. /*---------------------------------------------------------- JNI_OnLoad accept: JavaVM pointer to the Virtial Machine void * reserved ??? return: jint JNI version used. exceptions: none comments: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-14.html http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html grab the Java VM pointer when the library loads for later use in the drain thread. Also lets Java know we are using the 1.4 API so we can get pointers later. ----------------------------------------------------------*/ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *java_vm, void *reserved) { javaVM = java_vm; report_verbose("JNI_OnLoad called.\n"); return JNI_VERSION_1_2; /* JNI API used */ } From beat.arnet at gmail.com Sun Dec 28 08:27:14 2008 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 28 Dec 2008 10:27:14 -0500 Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> Message-ID: <49579AD2.9080303@gmail.com> Hello All, Do we have an official release of 2.2 that can be checked-out? Thanks and best wishes for the New Year! Beat Arnet Trent Jarvi wrote: > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > >> Hi all, >> >> attached patch revs up the RXTX version to 2.2 (and gets rid of some >> trailing whitespace). >> Ok to commit? >> >> Cheers, >> -- >> Martin Oberhuber, Senior Member of Technical Staff, Wind River >> Target Management Project Lead, DSDP PMC Member >> http://www.eclipse.org/dsdp/tm >> >> >> >> > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081228/cd3d16ae/attachment-0051.html From tjarvi at qbang.org Sun Dec 28 14:14:49 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 28 Dec 2008 14:14:49 -0700 (MST) Subject: [Rxtx] Rev up RXTX version to 2.2 In-Reply-To: <49579AD2.9080303@gmail.com> References: <460801A4097E3D4CA04CC64EE648584808AB0042@ism-mail03.corp.ad.wrs.com> <49579AD2.9080303@gmail.com> Message-ID: I'll be putting test binaries up tomorrow evening. On Sun, 28 Dec 2008, Beat Arnet wrote: > Hello All, > Do we have an official release of 2.2 that can be checked-out? > Thanks and best wishes for the New Year! > Beat Arnet > > > Trent Jarvi wrote: > > On Thu, 27 Nov 2008, Oberhuber, Martin wrote: > > > > Hi all, > > attached patch revs up the RXTX version to 2.2 (and gets rid of some > trailing whitespace). > Ok to commit? > > Cheers, > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > > > > No objection here. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > From tjarvi at qbang.org Mon Dec 29 19:45:57 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 29 Dec 2008 19:45:57 -0700 (MST) Subject: [Rxtx] 2.2pre1 delayed a day. Message-ID: I can't make a w64 binary from CVS tonight. My 500 mhz home system with a 12 gig hd can't do it. I could just give binaries, but they wouldnt reflect the recent changes. Looks like I need to fix this. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 30 20:43:55 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 30 Dec 2008 20:43:55 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. Message-ID: Season's greatings! This is the first in what will be more than one attempt to get the binaries right for rxtx-2.2. There are three things I'm looking for: 1) Sane binaries are built by default - no special flags required. 2) The binaries are functional. 3) No 'unusual' build environments are required. You should be able to do this at home. Visual Studio was used for Windows, however. There are a few things I'm not currently looking at: 1) web installs - next. 2) the ToyBox builds - those come last. (The ToyBox is another ~15 platforms). 3) "Could you add/fix/...." Everyone has the source. We need to make a release. If it isn't a regression, I probably will not get to it but you may. I've compiled binaries for the following platforms: Mac: ppc, i686, x86_64 (universal binaries) Solaris: sparc32, sparc64 Linux: i686, x86_64 Windows: win64, win32 The files are are downloadable from qbang.org. http://rxtx.qbang.org/wiki/index.php/Download cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip For help installing: http://rxtx.qbang.org/wiki/index.php/Installation The only difference between the source above and CVS is the version number used in the library version checks. For sol64 builds, I did add -m64 to the flags in the Makefile manually. The ChangeLog is in with the source for now. Initially, I could use a hand testing the binaries and updating the wiki pages at http://rxtx.qbang.org which is what www.rxtx.org will be when the rxtx 2.2 release goes out. For now, I just want to take feedback from a smaller group to catch any obvious mistakes. I'll announce the binaries on rxtx.org when we are ready for a larger audience. -- Trent Jarvi tjarvi at qbang.org From tristan.dyer at cgi.com Wed Dec 31 10:34:34 2008 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 31 Dec 2008 12:34:34 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Hi, I have tried building the rxtx library for OpenSolaris 2008.11. It seemed to build fine without errors, however code such as java.util.Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean found = false; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println(" " + portId.getName()); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equalsIgnoreCase(portname)) { System.out.println("found"); found = true; break; } } } Will output nothing. Or rather it seems as if there are no ports found by RXTX. This code works on Ubuntu8.04 and winXP. If I Add the port manually and then try and open the port gnu.io.CommPortIdentifier.addPortName("/dev/term/a", CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); try{ portId = CommPortIdentifier.getPortIdentifier(portname); } catch(Exception e){ System.out.println("NoSuchPortException"); //ignore } try { System.out.println("opening port"); port = (gnu.io.SerialPort) portId.open(this.printerName, WAIT_TO_OPEN); connected = true; System.out.println("Connected to port " + portId.getName()); } catch (PortInUseException p) { if (DEBUG) { System.err.println(p); } port = null; portId = null; System.out.println("PortInUseException"); p.printStackTrace(); } I will get the following, but not the NoSuchPortException. java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Caused by: java.lang.NullPointerException at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) ... 7 more As well as java.lang.NullPointerException at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) at net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) at net.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at net.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueManagerImpl.java:406) at net.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl.java:77) at net.leaguedata.printing.PrintServer.main(Unknown Source) Did I build it wrong? Or is there a problem with OpenSolaris that will prevent this from working? Or am I missing something incredibly simple? As well OpenSolaris is running inside a VM with COM1 mapped to COM1(VirtualBox) which I believe maps it to /dev/term/a Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. Thanks, -- Tristan Dyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081231/3a8735ec/attachment-0048.html From tjarvi at qbang.org Wed Dec 31 12:03:38 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 31 Dec 2008 12:03:38 -0700 (MST) Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > Hi, > > I have tried building the rxtx library for OpenSolaris 2008.11. > > It seemed to build fine without errors, however code such as > > ????? java.util.Enumeration portList > ???????? = CommPortIdentifier.getPortIdentifiers(); > ????? boolean found = false; > ????? while (portList.hasMoreElements()) { > ???????? portId = (CommPortIdentifier) portList.nextElement(); > ???????? System.out.println(" " + portId.getName()); > ???????? if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > ?????????? ???? ?? System.out.println("found"); > ?????????????? found = true; > ?????????????? break; > ??????????? } > ???????? } > ????? } > Will output nothing. > > Or rather it seems as if there are no ports found by RXTX. This code works > on Ubuntu8.04 and winXP. > > If I Add the port manually and then try and open the port > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > ????? try{ > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > ????? } > ????? catch(Exception e){ > ??? ??? ? System.out.println("NoSuchPortException"); > ??? ??? ? //ignore > ????? } > ????? try { > ??????? ???????? System.out.println("opening port"); > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > WAIT_TO_OPEN); > ??????????? connected = true; > ??????????? System.out.println("Connected to port " + portId.getName()); > ???????? } catch (PortInUseException p) { > ??????????? if (DEBUG) { > ?????????????? System.err.println(p); > ??????????? } > ??????????? port = null; > ??????????? portId = null; > ??????????? System.out.println("PortInUseException"); > ??????????? p.printStackTrace(); > ???????? } > > I will get the following, but not the NoSuchPortException. > > java.lang.reflect.InvocationTargetException > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > Caused by: java.lang.NullPointerException > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:296) > > ??????? ... 7 more > > > As well as > > java.lang.NullPointerException > ??????? at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > ??????? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > ??????? at > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > ??????? atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterEF4565.java:255) > > ??????? at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > ??????? atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce > ssorImpl.java:39) > ??????? atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru > ctorAccessorImpl.java:27) > ??????? at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory(PrintQueueMana > gerImpl.java:406) > ??????? atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQueueManagerImpl. > java:77) > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Did I build it wrong? Or is there a problem with OpenSolaris that will > prevent this from working? Or am I missing something incredibly simple? > > As well OpenSolaris is running inside a VM with COM1 mapped to > COM1(VirtualBox) which I believe maps it to /dev/term/a > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > Hi Tristan? What is the output of System.getProperty("os.name") on OpenSolaris? We have logic like the following in RXTX to handle platform specific information: if ( osName.equals("Solaris") || osName.equals("SunOS")) Which may not be getting hit. The result if you will never call private void checkSolaris(String PortName, int PortType). It could also result in Solaris specific settings not being set in the Makefile. The os.name is displayed when you run the configure script. -- Trent Jarvi tjarvi at qbang.org From shawn.bertrand at tycoelectronics.com Mon Dec 1 09:12:12 2008 From: shawn.bertrand at tycoelectronics.com (Bertrand, Shawn R) Date: Mon, 1 Dec 2008 11:12:12 -0500 Subject: [Rxtx] USB to serial adapter Message-ID: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> I happen to be using the 8 port USB to serial adapter from SerialGear (model number is USBG-8COM), but I'll have to say that I haven't had very good luck with this unit. The transmission speed is 1/10th of what it should be, and I can't figure out why. Trying to transmit data to our hardware at 115k baud only realizes maybe 10k. Anyone have any ideas as to why I can achieve correct speeds over the onboard serial port but horribly lackluster speeds when transmitting via USB to serial? Thanks in advance, Shawn > Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) > From: Trent Jarvi > Subject: Re: [Rxtx] USB to serial adapter > To: Eike Hinderk J?rrens > Cc: RxTx-Mailinglist > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: > > > Hello out there, > > I am looking for an usb to serial adapter that works fine with linux > > and windows using rxtx/Java. > > Can you recommend any to me (not to expensive)? I will buy it here in germany. > > Thank you for your help > > Hi Eike > > The two main types we see are based upon FTDI chips and pl2303 chips. > You can google for 'serial linux/windows XXXX problem' and make up your own mind. > > If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) > > Most of the 'usb serial' problems I hear about now are related to bluetooth. > > -- > Trent Jarvi > tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081201/ab7c04e4/attachment-0079.html From tjarvi at qbang.org Mon Dec 1 18:15:09 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 1 Dec 2008 18:15:09 -0700 (MST) Subject: [Rxtx] USB to serial adapter In-Reply-To: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> References: <47DD2C687D32EF4F966545D35670102802756AB3D9@us194mx002.tycoelectronics.net> Message-ID: Hi Shawn Just one thought.. When you write a single character over USB, there is a significant amount of overhead required to get that character on the line. Try increasing the size of your writes if it is possible. On Mon, 1 Dec 2008, Bertrand, Shawn R wrote: > I happen to be using the 8 port USB to serial adapter from SerialGear > (model number is USBG-8COM), but I'll have to say that I haven't had > very good luck with this unit. The transmission speed is 1/10th of what > it should be, and I can't figure out why. Trying to transmit data to > our hardware at 115k baud only realizes maybe 10k. > > Anyone have any ideas as to why I can achieve correct speeds over the > onboard serial port but horribly lackluster speeds when transmitting via > USB to serial? > > Thanks in advance, > > Shawn > > >> Date: Tue, 25 Nov 2008 16:30:57 -0700 (MST) >> From: Trent Jarvi >> Subject: Re: [Rxtx] USB to serial adapter >> To: Eike Hinderk J?rrens >> Cc: RxTx-Mailinglist >> Message-ID: >> Content-Type: text/plain; charset="iso-8859-1" >> >> On Tue, 25 Nov 2008, Eike Hinderk J?rrens wrote: >> >>> Hello out there, >>> I am looking for an usb to serial adapter that works fine with linux >>> and windows using rxtx/Java. >>> Can you recommend any to me (not to expensive)? I will buy it here in germany. >>> Thank you for your help >> >> Hi Eike >> >> The two main types we see are based upon FTDI chips and pl2303 chips. >> You can google for 'serial linux/windows XXXX problem' and make up your own mind. >> >> If the vendor has been supporting Linux/Windows for ~4 years, they are probably OK now. The kernel drivers have matured. > Just make sure the kernel driver you use isn't 4 years old :) >> >> Most of the 'usb serial' problems I hear about now are related to bluetooth. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > From ksligphone at gmail.com Wed Dec 3 18:00:33 2008 From: ksligphone at gmail.com (Khaled Sliman) Date: Wed, 3 Dec 2008 20:00:33 -0500 Subject: [Rxtx] No Ports showing up at run time Message-ID: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Hi, I am new to Java, but I using Nebeans 6.5 for a project and on one of my dialogs, I try to do this when the window opens Enumeration pList; pList = CommPortIdentifier.getPortIdentifiers(); while(pList.hasMoreElements()) { CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); cboB1ComPort.addItem(cpi.getName()); } For some odd reason, this works fine in the IDE, but when I try to run the program out side the IDE nothing happens the form is displayed but the combo box is not populated, I have tried this both on windows and in Ubuntu 7, and it is the same issue, I am using JDK 1.6, if anyone can be of any help please -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20081203/06829cbc/attachment-0077.html From tjarvi at qbang.org Wed Dec 3 18:22:22 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 3 Dec 2008 18:22:22 -0700 (MST) Subject: [Rxtx] No Ports showing up at run time In-Reply-To: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> References: <3bc4b57d0812031700m1ff2cb16v989919ed1413ebad@mail.gmail.com> Message-ID: On Wed, 3 Dec 2008, Khaled Sliman wrote: > Hi, > > > > I am new to Java, but I using Nebeans 6.5 for a project and on one of my > dialogs, I try to do this when the window opens > > > > > > Enumeration pList; > > pList = CommPortIdentifier.getPortIdentifiers(); > > > > while(pList.hasMoreElements()) > > { > > CommPortIdentifier cpi = (CommPortIdentifier)pList.nextElement(); > > cboB1ComPort.addItem(cpi.getName()); > > } > > > > For some odd reason, this works fine in the IDE, but when I try to run the > program out side the IDE nothing happens the form is displayed but the combo > box is not populated, I have tried this both on windows and in Ubuntu 7, and > it is the same issue, I am using JDK 1.6, if anyone can be of any help > please > Hi Khaled This does not sound like an RXTX issue. I'd try replacing the above code with some dummy/stub code to verify the issue is not related to rxtx. The only possible issue I can think of is you have the programming running in the IDE and that prevents your stand alone version from accessing the serial ports. -- Trent Jarvi tjarvi at qbang.org From Martin.Oberhuber at windriver.com Thu Dec 4 13:56:37 2008 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 4 Dec 2008 21:56:37 +0100 Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> Message-ID: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Hi all, about a year back we had a discussion about RXTX being slow when scanning serial ports on Windows (see attached below). This recently came up for me again, and I created a bug for it: http://bugzilla.qbang.org/show_bug.cgi?id=103 The good news is that I found some Open Source code that does provide serial port enumeration without necessarily scanning the ports. The author is OK with contributing this! So, in order to test it, could anybody who's got some "special" serial devices such as USB/Serial converters, bluetooth modems, virtual ports and the like try out the program from http://www.naughter.com/enumser.html and report on the bug if you think that the last method of that program ("UsingRegistry", my favorite one) does not behave properly or you find any other odd issues. I'm planning to take care of this such that we either get the code into RXTX as the default port detection method (hooking into registerKnownPorts() just like the Mac), or as a user selectable Port Scanning Policy as I have proposed before. Please let me know if you have any issues with this strategy. Thanks! -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Friday, October 12, 2007 4:54 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; > rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha > Subject: RE: RXTX port scanning on Vista? > > Hi Martin, > > The native code does a test on each serial port which may not > work with > virtual ports in their current state. It opens the port with > overlapped > io and does a timed out read. I've found that the Bluetooth drivers > vary a great deal in reliability, reproducibility and completeness. > Opening some Bluetooth ports with overlapped IO as RXTX does > really does > take 30 seconds for instance. The example code that comes with the > drivers just avoid using overlapped io. RXTX could not do event > notification in that form. > > With USB-serial dongles, we just let end users complain until the > drivers behaved reasonably. I would question the utility of trying to > optimize around questionable drivers vs pointing out the problems. > > Gautam has been doing some testing of bluetooth drivers > recently and may > have more observations. > > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Friday, October 12, 2007 5:18 AM > To: Trent Jarvi; taj at www.linux.org.uk; Trent Jarvi; rxtx at qbang.org > Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX port scanning on Vista? > > Hi all, > > We have a Windows Vista machine with two "ordinary" > serial ports (COM1; COM3) plus two virtual serial > ports: COM7 and COM10 are reserved for bluetooth modems > though typically > not connected. > > The previous incarnation of our application used the Sun javacomm > library, and detected all 4 ports instantly, without any delay. > > Our latest release is scheduled to use RXTX-2.1-7r2, and we see the > following: > * RXTX takes about 30 seconds trying to detect > the ports, but only finds COM1 and COM3 > > It looks like the RXTX method of finding COM ports is not optimal on > Windows. Is this a known issue? Is there a bugzilla item for it? Is > there anything we can do about it? > > By code inspection we found one workaround: run > java -Dgnu.io.rxtx.SerialPorts=COM1;COM3 > switches off port scanning to avoid the delay, but it keeps the ports > fixed. I'm wondering if there is any better way to address this. > > Thanks, > Martin > > > -----Original Message----- > From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] > Sent: Tuesday, September 04, 2007 4:15 PM > To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RE: RXTX mailing list archives? > > Hi Martin, > > My apologies for the delays. I've been putting all my free time into > getting qbang back up. Sadly, I have had little free time until now > with 3 trips. > > I spent considerable time restoring qbang.org last weekend from a > hardware failure. I looks like everything is going to be OK but the > mail-list in particular is going to need more work. It is there but > some of it is inodes in lost+found. I hope to ship the server back to > Colorado this week. The wiki is also OK. > > The main difficulty I've had is moving the data from old to new drives > with limited bays/connections for the SATA drives. > > Once I send the machine back, I'll start verifying the list against my > personal email folder. > > -----Original Message----- > From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] > Sent: Tuesday, September 04, 2007 5:42 AM > To: taj at www.linux.org.uk; Trent Jarvi; Trent Jarvi > Cc: Stieber, Uwe; Gutschelhofer, Martin > Subject: RXTX mailing list archives? > > Hi Trent, > > the RXTX mailing list archives are still not accessible from > http://mailman.qbang.org/pipermail/rxtx/ > The other qbang services are also down, e.g. bugzilla > http://bugzilla.qbang.org/ http://rxtx.qbang.org/eclipse > > Are they going to come back up, or will they be lost forever? > > I'm still looking for an answer for attached question, we'll > need to get > that issue fixed for our release. > For Eclipse, we're releasing Sept. 25 so I'd really like to > know soon... > > Thanks, > -- > Martin Oberhuber > Wind River Systems, Inc. > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > From tjarvi at qbang.org Thu Dec 4 19:18:37 2008 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 4 Dec 2008 19:18:37 -0700 (MST) Subject: [Rxtx] Serial Port Enumeration on Windows In-Reply-To: <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> References: <460801A4097E3D4CA04CC64EE6485848033419BE@ism-mail03.corp.ad.wrs.com> <460801A4097E3D4CA04CC64EE648584808BCCEAC@ism-mail03.corp.ad.wrs.com> Message-ID: This looks great Martin. I don't see any problems. The authors intent is clear and works with your proposed integration. It solves a significant pain point for people trying to use bluetooth over the serial interface. I think I can pull up a test case (I'll have to find the lego mindstorm again :). On Thu, 4 Dec 2008, Oberhuber, Martin wrote: > Hi all, > > about a year back we had a discussion about RXTX being slow > when scanning serial ports on Windows (see attached below). > This recently came up for me again, and I created a bug for it: > > http://bugzilla.qbang.org/show_bug.cgi?id=103 > > The good news is that I found some Open Source code that does > provide serial port enumeration without necessarily scanning > the ports. The author is OK with contributing this! So, in > order to test it, could anybody who's got some "special" > serial devices such as USB/Serial converters, bluetooth modems, > virtual ports and the like try out the program from > > http://www.naughter.com/enumser.html > > and report on the bug if you think that the last method of > that program ("UsingRegistry", my favorite one) does not > behave properly or you find any other odd issues. > > I'm planning to take care of this such that we either get > the code into RXTX as the default port detection method > (hooking into registerKnownPorts() just like the Mac), > or as a user selectable Port Scanning Policy as I have > proposed before. Please let me know if you have any > issues with this strategy. > > Thanks! > -- > Martin Oberhuber, Senior Member of Technical Staff, Wind River > Target Management Project Lead, DSDP PMC Member > http://www.eclipse.org/dsdp/tm > > > >> -----Original Message----- >> From: Trent Jarvi [mailto:Trent.Jarvi at mathworks.com] >> Sent: Friday, October 12, 2007 4:54 PM >> To: Oberhuber, Martin; taj at www.linux.org.uk; Trent Jarvi; >> rxtx at qbang.org >> Cc: Gaff, Doug; Stieber, Uwe; Gutschelhofer, Martin; Gautam Vallabha >> Subject: RE: RXTX port scanning on Vista? >> >> Hi Martin, >> >> The native code does a test on each serial port which may not >> work with >> virtual ports in their current state. It opens the port with >> overlapped >> io and does a timed out read. I've found that the Bluetooth drivers >> vary a great deal in reliability, reproducibility and completeness. >> Opening some Bluetooth ports with overlapped IO as RXTX does >> really does >> take 30 seconds for instance. The example code that comes with the >> drivers just avoid using overlapped io. RXTX could not do event >> notification in that form. >> >> With USB-serial dongles, we just let end users complain until the >> drivers behaved reasonably. I would question